package cn.zucc.edu.handyzucc.service;

import cn.zucc.edu.handyzucc.entity.Post;
import cn.zucc.edu.handyzucc.entity.PostFavorite;
import cn.zucc.edu.handyzucc.entity.PostVote;

import java.util.List;

public interface PostService {
    List<Post> getAllPosts();
    List<Post> getPostsByAuthor(Integer post_author);
    List<Post> getPostsByFollow(Integer follow_follower);
    List<Post> getFavoritePosts(Integer postfavorite_userid);
    List<Post> getPostsByKeyword(String keyword);
    Integer addPost(Post post);
    boolean deletePost(Integer post_id);
    boolean deletePostInAdmin(Integer post_id);
    boolean deleteFavoritePost(Integer postfavorite_postid, Integer postfavorite_userid);
    Post getPostDetail(Integer post_id);
    boolean ifAlreadyFollow(Integer follow_leader, Integer follow_follower);
    boolean getPostVote(Integer post_id, Integer user_id);
    boolean getPostFavorite(Integer post_id, Integer user_id);
    boolean addFollow(Integer follow_leader, Integer follow_follower);
    boolean cancelFollow(Integer follow_leader, Integer follow_follower);
    boolean addPostVote(Integer post_id, Integer user_id);
    boolean cancelPostVote(Integer post_id, Integer user_id);
    boolean addPostFavorite(Integer post_id, Integer user_id);
    boolean cancelPostFavorite(Integer post_id, Integer user_id);
    boolean updatePost(Integer post_id, String type, Integer step);

}